package dancespeedyenumsmongo

const (
	RoseRankLogChangeTypeAdd     = 1 //增加
	RoseRankLogChangeTypeReduced = 2 //减少

	RoseRankScoreSourceSystemSend      = 1 //系统赠送
	RoseRankScoreSourceAddUpGiftValue  = 2 //累计礼物价值获得
	RoseRankScoreSourceOtherGiveAdd    = 3 //他人赠送获得
	RoseRankScoreSourceGiveOtherReduce = 4 //赠送他人减少
)

type DanceRoseRankEnums struct {
}

var DanceRoseRankEnumsObject DanceRoseRankEnums

func (e DanceRoseRankEnums) ScoreSourceType() []int {
	return []int{
		RoseRankScoreSourceSystemSend,
		RoseRankScoreSourceAddUpGiftValue,
		RoseRankScoreSourceOtherGiveAdd,
		RoseRankScoreSourceGiveOtherReduce,
	}
}

func (e DanceRoseRankEnums) ScoreSourceTypeMap() map[int]string {
	m := make(map[int]string)
	for _, s := range e.ScoreSourceType() {
		m[s] = e.ScoreSourceString(s)
	}
	return m
}

func (e DanceRoseRankEnums) ScoreSourceString(tag int) string {
	switch tag {
	case RoseRankScoreSourceSystemSend:
		return "系统赠送"
	case RoseRankScoreSourceAddUpGiftValue:
		return "累计礼物价值获得"
	case RoseRankScoreSourceOtherGiveAdd:
		return "他人赠送获得"
	case RoseRankScoreSourceGiveOtherReduce:
		return "赠送他人减少"
	default:
		return "未知"
	}
}
